package net.lab1024.sa.admin.module.business.supercomputer.selecttablename.dao;


import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Component;



@Component
@Mapper
public interface SaveTableNamesDao {

    @Update("update datasource set source_tablename = #{tableName} where data_source_id = #{sourceId}")
    void saveTableNames(@Param("tableName") String tableName,@Param("sourceId") Integer sourceId);


    @Select("select source_tablename from datasource where data_source_id = #{sourceId}")
    String getTableNameBySourceName(Integer sourceId);

}
